Repository navigation
[Refactor] Remove no-explicit-any suppressions: batch 3 (integrations) - #2309
zoomote2[bot] wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one): 1
Please check the settings in the CodeRabbit UI or the
|
|
2 issues outstanding. See session
Reviewed 0f236c4 |
|
Self-review of the full diff (24 files: 23 campaign files + the ledger). Summary of what I checked and where reviewers should look: Verified clean
Behavior-equivalent changes a reviewer should confirm are acceptable
Environment notes
|
Review statusThis PR was opened by an automated account. A human maintainer must verify the change intent, provenance, and validation before merging. Current step: Mark the PR ready. Required CI must pass before CodeRabbit starts. Review-state labels are managed by this workflow; do not edit them manually. |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
|
|
||
| console.log("\n--- Function 3: truncateOutput ---") | ||
| runPerformanceTest("truncateOutput", truncateOutput, testData, iterations, [lineLimit]) | ||
| runPerformanceTest("truncateOutput", truncateOutput, testData, iterations) |
There was a problem hiding this comment.
This drops the truncation limit, so the "Function 3: truncateOutput" benchmark no longer measures truncation. runPerformanceTest forwards its variadic args (fn(input, ...args)), so the old call ran truncateOutput(testData, 500). With no limit, truncateOutput early-returns the input unchanged (src/integrations/misc/extract-text.ts:254-256, if (!lineLimit && !characterLimit) return content), turning the benchmark into a pass-through and invalidating its throughput numbers. The closure-captured lineLimit mentioned in the PR description belongs to the separate "Full Pipeline" benchmark below, not this call site.
The new generic signature can still carry the argument: pass it as a variadic arg instead.
| runPerformanceTest("truncateOutput", truncateOutput, testData, iterations) | |
| runPerformanceTest("truncateOutput", truncateOutput, testData, iterations, lineLimit) |
| if (!activeDiffEditor) { | ||
| throw new Error("activeDiffEditor was not set") | ||
| } |
There was a problem hiding this comment.
Duplicated guard: this identical if (!activeDiffEditor) check appears twice in a row (the earlier one at the top of the block already narrows the type). Looks like a leftover from the refactor — one of the two can be removed.
Related GitHub Issue
Part of the no-explicit-any suppression elimination campaign. This is batch 3. It follows #2281 (batch 1) and #2286 (batch 2). The campaign tracks the suppressions ledger in
src/eslint-suppressions.json; this batch has no separate tracking issue.Description
Batch 3 removes every
no-explicit-anysuppression insrc/integrations. The ledger shrinks from 3,315 suppressions across 292 files to 2,884 suppressions across 269 files. That removes all 431 suppressedanys in the 23integrationsfiles, and the ledger entry for each file is gone.The fixes are real type fixes. No
as any, no@ts-ignore, and no moved suppressions. Assertions and runtime behavior stay unchanged. The main patterns:diffViewProvider["relPath"]), perAGENTS.md.src/test-utils/vscode.ts, or full structuralvscode.Tab/TabGroupdoubles. Double assertions appear once per double at its construction site, with a comment that names the members the double provides.getTheme.tsnow uses recursiveJsonValue/ParsedThemetypes instead ofany.execSyncfailure paths in the terminal stream helpers use anExecExceptionintersection instead oferror: any.__TEST_ENV__global uses a propervardeclaration instead of(global as any).Two production files change:
src/integrations/theme/getTheme.ts(JSON types plus one documented theme conversion) andsrc/integrations/editor/DiffViewProvider.ts(typed rejection handler). All other changes are test files. No user-facing behavior changes.Test Procedure
Validation ran after a rebase onto latest
main(debd3c7). All gates pass:src/integrationssuites pass. 564 test files: 564 passed, 23 skipped (platform-gated shell and PowerShell suites). Per-file runs: DiffViewProvider.spec 71/71, TerminalProfile.spec 57/57, TerminalProcess.spec 41/41, TerminalRegistry.spec 19/19, TerminalProcess.test 7/7, ExecaTerminalProcess.spec 19/19, OutputInterceptor 25/25, open-file 8/8, EditorUtils 8/8, InterpretExitCode 9/9, kimi-code oauth + export-markdown 35/35.pnpm lintpasses with zero warnings across all 12 workspace packages. Each touched file was pruned witheslint --prune-suppressions --max-warnings=0.pnpm check-typespasses (root project plus 11 turbo tasks).pnpm --dir src testpasses. 12,276 tests passed, 39 skipped (platform-gated).pnpm test: 14/14 turbo tasks pass. The first full run had one transient failure in the extension suite that matches the known order-dependentextension.spec.tsflake. Two later full runs pass clean. Recorded, not chased.--max-warnings=0, Prettier, mutation judgement).Guardrail scan since #2279: main added no new suppressions. Main added one direct
vi.clearAllMocks()call inwebview-ui/.../SettingsView.spec.tsx(#2271). The webview workspace has no reset helper, and the #2279 guardrail covers the extension workspace only, so this matches the current webview convention. Recorded here, not changed in this batch.Pre-Submission Checklist
src/integrationssuppressions only.as any, no@ts-ignore, and no new suppressions. The ledger change removes exactly 23 files; no entry is added or raised.src/test-utils/vscode.tshelpers, or single construction-site double assertions with comments naming the provided members.Visual Snapshots
Not applicable. This change is type-level only. No rendered UI changes.
Videos
Not applicable. No interaction or animation changes.
Documentation Updates
No functionality changed, so the docs repository needs no companion PR.
Additional Notes
Ledger delta: 3,315 suppressions across 292 files → 2,884 suppressions across 269 files (−431 suppressions, −23 files). The next batch can pick up any remaining directory. The workspace baseline needs
packages/buildcompiled andpnpm --dir src bundlerun before__tests__/dist_assets.spec.tscan pass; the sandbox needed that step once.